Optimal. Leaf size=192 \[ \frac {a \sin (e+f x) \cos (e+f x) \cos ^2(e+f x)^{\frac {n-1}{2}} (d \sec (e+f x))^n F_1\left (\frac {1}{2};\frac {n-1}{2},1;\frac {3}{2};\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right )}{f \left (a^2-b^2\right )}-\frac {b \sin (e+f x) \cos ^2(e+f x)^{n/2} (d \sec (e+f x))^n F_1\left (\frac {1}{2};\frac {n}{2},1;\frac {3}{2};\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right )}{f \left (a^2-b^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.30, antiderivative size = 192, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3869, 2823, 3189, 429} \[ \frac {a \sin (e+f x) \cos (e+f x) \cos ^2(e+f x)^{\frac {n-1}{2}} (d \sec (e+f x))^n F_1\left (\frac {1}{2};\frac {n-1}{2},1;\frac {3}{2};\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right )}{f \left (a^2-b^2\right )}-\frac {b \sin (e+f x) \cos ^2(e+f x)^{n/2} (d \sec (e+f x))^n F_1\left (\frac {1}{2};\frac {n}{2},1;\frac {3}{2};\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right )}{f \left (a^2-b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 429
Rule 2823
Rule 3189
Rule 3869
Rubi steps
\begin {align*} \int \frac {(d \sec (e+f x))^n}{a+b \sec (e+f x)} \, dx &=\left (\cos ^n(e+f x) (d \sec (e+f x))^n\right ) \int \frac {\cos ^{1-n}(e+f x)}{b+a \cos (e+f x)} \, dx\\ &=-\left (\left (a \cos ^n(e+f x) (d \sec (e+f x))^n\right ) \int \frac {\cos ^{2-n}(e+f x)}{b^2-a^2 \cos ^2(e+f x)} \, dx\right )+\left (b \cos ^n(e+f x) (d \sec (e+f x))^n\right ) \int \frac {\cos ^{1-n}(e+f x)}{b^2-a^2 \cos ^2(e+f x)} \, dx\\ &=-\frac {\left (a \cos ^{2 \left (\frac {1}{2}-\frac {n}{2}\right )+n}(e+f x) \cos ^2(e+f x)^{-\frac {1}{2}+\frac {n}{2}} (d \sec (e+f x))^n\right ) \operatorname {Subst}\left (\int \frac {\left (1-x^2\right )^{\frac {1-n}{2}}}{-a^2+b^2+a^2 x^2} \, dx,x,\sin (e+f x)\right )}{f}+\frac {\left (b \cos ^2(e+f x)^{n/2} (d \sec (e+f x))^n\right ) \operatorname {Subst}\left (\int \frac {\left (1-x^2\right )^{-n/2}}{-a^2+b^2+a^2 x^2} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {a F_1\left (\frac {1}{2};\frac {1}{2} (-1+n),1;\frac {3}{2};\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) \cos ^2(e+f x)^{\frac {1}{2} (-1+n)} (d \sec (e+f x))^n \sin (e+f x)}{\left (a^2-b^2\right ) f}-\frac {b F_1\left (\frac {1}{2};\frac {n}{2},1;\frac {3}{2};\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos ^2(e+f x)^{n/2} (d \sec (e+f x))^n \sin (e+f x)}{\left (a^2-b^2\right ) f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 25.85, size = 5280, normalized size = 27.50 \[ \text {Result too large to show} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.71, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\left (d \sec \left (f x + e\right )\right )^{n}}{b \sec \left (f x + e\right ) + a}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (d \sec \left (f x + e\right )\right )^{n}}{b \sec \left (f x + e\right ) + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 2.83, size = 0, normalized size = 0.00 \[ \int \frac {\left (d \sec \left (f x +e \right )\right )^{n}}{a +b \sec \left (f x +e \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (d \sec \left (f x + e\right )\right )^{n}}{b \sec \left (f x + e\right ) + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (\frac {d}{\cos \left (e+f\,x\right )}\right )}^n}{a+\frac {b}{\cos \left (e+f\,x\right )}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (d \sec {\left (e + f x \right )}\right )^{n}}{a + b \sec {\left (e + f x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________